<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require("base_c.php");

class Home extends base_c {
	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/welcome
	 *	- or -  
	 * 		http://example.com/index.php/welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in 
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see http://codeigniter.com/user_guide/general/urls.html
	 */

	// function __construct() {
	// 	parent::__construct();
	// 	$this->load->view('partials/header');
	// }

	public function index()
	{
		$this->data['page'] = 'home';

		$this->data['aboutItem'] = $this->base_m->getNews('news', 1, 0, 0, 0, 1, '', 1);
		$this->data['newsItems'] = $this->base_m->getNews('news', 0, 2, 0, 0, 7, '', 0);
		$this->data['travelItem'] = $this->base_m->getNews('news', 0, 3, 0, 0, 5, '', 0);
		$this->data['title'] = 'Trang Chủ';
		$this->load->view('layout', $this->data);
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */

